package com.cheng.entity;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Past;
import java.util.Date;

@Data
public class Student {
    private int sNo;
    private String sName;
    private String sAge;
    private Address address;

    @Past//该日期必须为当前日期以前的---hibernate hibernate格式校验，格式化传来的参数时进行校验，
    @DateTimeFormat(pattern = "yyyy-MM-dd")//格式化前端传来的数据
    private Date birthday;
}
